Skip to content

Fix copying task logs dropping rows that scrolled out of view - #71156

Merged
bbovenzi merged 1 commit into
apache:mainfrom
Andrushika:fix-log-viewer-copy-rows
Aug 6, 2026
Merged

Fix copying task logs dropping rows that scrolled out of view#71156
bbovenzi merged 1 commit into
apache:mainfrom
Andrushika:fix-log-viewer-copy-rows

Conversation

@Andrushika

@Andrushika Andrushika commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Why

After #71148, when the user selects and tries to copy task log rows, virtualized rows that scrolled out of view are missing. It's because native copy only serializes mounted DOM.

What

Rebuild missing selected rows from parsed log data with the same plain-text rendering as the log download. Keep native copy for single-row, fully mounted, and multi-range selections.

stacked on: #71148
related: #68846

Before:

2026-08-05.3.53.54.mov

After:

2026-08-05.4.00.03.mov

Was generative AI tooling used to co-author this PR?
  • Yes — Codex (GPT-5)

Generated-by: Codex (GPT-5) following the guidelines

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Aug 5, 2026
Comment thread airflow-core/src/airflow/ui/src/queries/useLogs.tsx

@bbovenzi bbovenzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's rebase

The task log viewer only renders the visible rows. Copying a selection uses
the browser's default copy, which serializes only the rows currently in the
DOM, so rows the viewer has unmounted are silently missing from the copied
text.

Rebuild the missing rows from log data, using the same text pipeline as the
log download. The rebuild reads row text programmatically, which ignores the
CSS that keeps the line-number links out of a normal copy, so strip those
links too and leave single-row, fully-mounted, and multi-range selections to
the browser.
@Andrushika

Copy link
Copy Markdown
Contributor Author

Rebased. Thanks for reviewing!
I guess we can merge this first and I'll create follow up PR for unifying copy format.

@bbovenzi bbovenzi added this to the Airflow 3.3.2 milestone Aug 6, 2026
@bbovenzi bbovenzi added the backport-to-v3-3-test Backport to v3-3-test label Aug 6, 2026
@bbovenzi
bbovenzi merged commit 30f782c into apache:main Aug 6, 2026
170 checks passed
@Andrushika
Andrushika deleted the fix-log-viewer-copy-rows branch August 7, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-3-test Backport to v3-3-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants